package com.shoddon.cloud.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
//使用@FeignClient注解中的fallback属性指定回调类
@FeignClient(value = "compute-service", fallback = ComputeClientHystrix.class)//定义compute-service服务的接口  绑定该接口对应compute-service服务
public interface ComputeClient {
	@RequestMapping(method = RequestMethod.GET, value = "/compute")
    Integer compute(@RequestParam(value = "no1") Integer a, @RequestParam(value = "no2") Integer b);
}
